# eric7.QScintilla.TypingCompleters.CompleterBase

Module implementing a base class for all typing completers.

Typing completers are classes that implement some convenience actions, that are performed while the user is typing (e.g. insert ')' when the user types '(').

### Global Attributes

None

### Classes

CompleterBase | Class implementing the base class for all completers.

### Functions

None

## CompleterBase

Class implementing the base class for all completers.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

CompleterBase | Constructor
charAdded | Public slot called to handle the user entering a character.
isEnabled | Public method to get the enabled state.
readSettings | Public slot called to reread the configuration parameters.
setEnabled | Public slot to set the enabled state.

### Static Methods

None

#### CompleterBase (Constructor)

CompleterBase(editor, parent=None)

Constructor

editor (QScintilla.Editor)
  reference to the editor object
parent (QObject)
  reference to the parent object. If parent is None, we set the editor as the parent.

#### CompleterBase.charAdded

charAdded(charNumber)

Public slot called to handle the user entering a character.

Note 1: this slot must be overridden by subclasses implementing the specific behavior for the language.

Note 2: charNumber can be greater than 255 because the editor is in UTF-8 mode by default.

charNumber (int)
  value of the character entered

#### CompleterBase.isEnabled

isEnabled()

Public method to get the enabled state.

Return:
  enabled state

Return Type:
  bool

#### CompleterBase.readSettings

readSettings()

Public slot called to reread the configuration parameters.

Note: this slot should be overridden by subclasses having configurable parameters.

#### CompleterBase.setEnabled

setEnabled(enable)

Public slot to set the enabled state.

enable (bool)
  flag indicating the new enabled state

Up